home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- #include "DrawLib.h"
- #include "RadioLib.h"
- #include "TextLib.h"
-
- /* text preferences */
- typedef struct {
- TextKindType kind; /* kind of text documents to create */
- TextState state; /* text state */
- Boolean wrap; /* true if word wrap is enabled */
- Boolean buffer; /* true if should buffer keyboard input */
- float margin; /* word wrap margin */
- short just; /* text justification */
- } TextPrefsType;
-
- /* units of measure preferences */
- typedef struct {
- short id; /* id of unit (actually, index to a string) */
- float conversion; /* multiply by unit to get pixels */
- CStr31 singular; /* name of unit (e.g., inch) */
- CStr31 plural; /* plural name of unit (e.g., inches) */
- } UnitsPrefsType;
-
- /* document preferences */
- typedef struct {
- Rect margin; /* margins around page for printing */
- } DocumentPrefsType;
-
- /* application preferences */
- typedef struct {
- TextPrefsType text; /* text preferences */
- UnitsPrefsType units; /* units of measure preferences */
- DocumentPrefsType doc; /* document preferences */
- } AppPrefsType;
-
- /* preferences window structure */
- typedef struct {
- DialogPtr dlg; /* dialog for setting preferences */
- AppPrefsType *appPrefs; /* preferences to set from window */
- Boolean sizeHasUserChoice; /* true if added user's choice to font size
- popup menu */
- struct {
- RadioHandle frameRadio; /* frame around text settings */
- RadioHandle kindRadio; /* radio buttons for text document kind */
- RadioHandle wrapRadio; /* radio buttons for word wrap */
- } text;
- } AppPrefsWindowType, *AppPrefsWindowPtr, **AppPrefsWindowHandle;
-
- AppPrefsType *AppPrefs(void);
- const AppPrefsType *AppPrefsDefaults(void);
- AppPrefsWindowHandle AppPrefsBegin(AppPrefsType *appPrefs);
- void AppPrefsEnd(AppPrefsWindowHandle prefs);
- Boolean AppPrefsWithin(AppPrefsWindowHandle prefs, Point where);
- void AppPrefsClicked(AppPrefsWindowHandle prefs, long id);
- void AppPrefsRead(AppPrefsType *prefs);
- void AppPrefsWrite(const AppPrefsType *prefs);
- Boolean AppPrefsMenu(const MenuPickType *pick);
- void AppPrefsAdjustMenu(void);
- void AppPrefsShow(void);
- void AppPrefsHide(void);
- void AppPrefsMemoryLow(void);
- const /* EventTableType */ void *AppPrefsEventTable(void);
- void AppPrefsEventTableRegister(void);
-